<%= form_for(:session, url: events_path, :html => {:class=>'form-horizontal'}) do |t| %>
	<fieldset>
		<legend>
    <%= link_to '活动列表', events_path %>
    </legend>
  <div class="control-group">
    <label class="control-label">名称</label>
    <div class="controls">
    <%= t.text_field :title, :placeholder => '活动名称' %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">分类</label>
    <div class="controls">
      <%= select_tag "session[category]", options_from_collection_for_select(@esort, 'id', 'title') %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">链接</label>
    <div class="controls">
    <%= t.text_field :linkto, :placeholder => '链接地址' %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">上传图片</label>
    <div class="controls">
      <%= t.file_field :image %>
    </div>
  </div>
  <div class="control-group">
    <div class="controls">
      <button type="submit" class="btn">新增</button>
    </div>
  </div>
</fieldset>
<% end %>
